<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>ArduPilot Log Finder</title>
<link rel="icon" href="../images/AP_favicon.png">
<script type="text/javascript" src="LogFinder.js"></script>
<script type="text/javascript" src="../Libraries/FileSaver.js"></script>
<script type="text/javascript" src="../Libraries/LoadingOverlay.js"></script>
<script type="text/javascript" src="../Libraries/OpenIn.js"></script>
<script type="text/javascript" src="../Libraries/Param_Helpers.js"></script>
<script type="text/javascript" src="../Libraries/LogHelpers.js"></script>

<link href="../modules/tabulator/dist/css/tabulator.min.css" rel="stylesheet">
<script src="../modules/build/luxon/build/global/luxon.min.js"></script>
<script src="../modules/tabulator/dist/js/tabulator.min.js"></script>

<script src="../modules/build/floating-ui/dist/umd/popper.min.js"></script>
<script src="../modules/build/tippyjs/dist/tippy-bundle.umd.min.js"></script>

<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js" integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" crossorigin=""></script>

</head>
<table style="width:1200px"><tr><td>
  <a href="https://ardupilot.org"><img src="../images/ArduPilot.png"></a>
</td><td>
  <a href="https://github.com/ArduPilot/WebTools"><img src="../images/github-mark.png" style="width:60px"></a>
  <br>
  <a href="https://github.com/ArduPilot/WebTools"><img src="../images/GitHub_Logo.png" style="width:60px"></a>
</td></tr></table>

<style>
  div.plotly-notifier {
    visibility: hidden;
  }
</style>

<h1><a href="" style="color: #000000; text-decoration:none;">ArduPilot Log Finder</a></h1>

<body onload="initial_load(); reset();">

<table>
  <tr>
    <td>
      <fieldset id="param_diff_ignore" style="width:1000px;">
        <legend>Ignore parameter changes
            <img id="TT" src="../images/question-circle.svg" style="width: 1em; vertical-align: bottom" 
            data-tippy-content='Ignore parameter changes for the selected items when doing a parameter compare. These parameters are expected to change each boot'/>
        </legend>

      </fieldset>
    </td>
  </tr>
</table>

<P>
<button id="get_dir" type="button" onclick="loading_call(get_dir_then_load)">Search directory</button>
<button id="reload" type="button" onclick="loading_call(load_from_dir)">Reload</button>
</P>
<P>
<progress id="load" style="width: 1200px; height: 30px;"></progress>
</P>

<div id="tables"></div>

<script>

  window.onerror = function(msg, url, linenumber) {
      if (msg == "ResizeObserver loop completed with undelivered notifications.") {
          // This happens when tables are resized, I'm not sure why but the alert is annoying
          console.log(msg);
          return
      }
      alert('Sorry, something went wrong.\n\n' + 
            'Please try a hard reload of this page to clear its cache.\n\n' +
            'If the error persists open an issue on the GitHub repo.\n' +
            'Include a copy of the log and the following error message:\n\n' +
            msg + '\n' +
            'URL: '+ url +'\n' +
            'Line Number: '+ linenumber)
  }
  window.addEventListener('unhandledrejection', function (e) {
    throw new Error(e.reason.stack)
  })

  // Load tool tips
  tippy('#TT')

  init_loading_overlay()

</script>

</body>
</html>
